#include<bits/stdc++.h>
using namespace std;
const int N=100005;
int n,r[N],ans;

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>r[i];
    }
    sort(r+1,r+1+n);
    for(int i=1,j=1;i<=n;i++,j++){
        if(r[i]>r[j]){
            ans++;
        } else{
            j--;
        }
    }
    ans=n-ans;
    cout<<ans;



    return 0;
}
